"""
@file:view
@Author:熙梵
@sate:2020/07/14
"""
#蓝图定义
from flask import Blueprint, render_template
view_bp = Blueprint('view1',__name__,url_prefix='')

@view_bp.route("/index/",methods=["GET"],endpoint="index0001")
def index():
    lead_news = {'title': "塞尔维亚各界期待习近平主席到访-小欧",
                 'content':"国家主席习近平将对塞尔维亚进行国事访问。塞尔维亚各界热切期待习近平主席的到访。"}
    context = {
        "lead_news": lead_news,
    }
    return render_template('index.html', **context)



def index2():
    return "this is index2"
view_bp.add_url_rule("index2/",view_func=index2)